home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu096.dms / pu096.adf / DWIP / DWIP.doc < prev    next >
Text File  |  1991-07-08  |  14KB  |  271 lines

  1.                         USER'S GUIDE TO DWIP
  2.                         ====================
  3.  
  4. by Ken Van Camp  (March 1988)
  5.    Digitized Data Display Systems
  6.    P.O. Box 878
  7.    Marshalls Creek, PA 18335-0878
  8. Placed in the public domain by the author.
  9.  
  10. ACKNOWLEDGEMENT: DWIP is heavily based on the jiff and plop programs by
  11. Jim Kent.  Many thanks to Jim for writing a well-documented IFF file
  12. reader/displayer.  This program would have taken me months to write
  13. without his code, instead of the two days that it actually took.
  14.  
  15. INTRODUCTION:
  16.     DWIP stands for "Daisy Wheel IFF Printer", and it is intended as a
  17. general-purpose IFF file printing utility for Amiga users who either
  18. (1) want to do graphics on their daisy wheel printer; or (2) just want
  19. to quickly make very large dumps of their IFF files.
  20.     While it is true that most screen dump utilities will allow the user
  21. to blow up his image as large as he likes, it is generally impractical
  22. to blow up images to a very large size because of the time involved
  23. (not to mention expense in printer ribbons and wear&tear on your printer).
  24. I wrote DWIP because I wanted to create large banners quickly of files I
  25. had created on my Amiga.  (Note that I use the word "quickly" in a relative
  26. sense.  I think DWIP is about as quick as you can possibly get in making
  27. screen dumps with standard printers, but it still takes awhile to print
  28. a screen.)
  29.     First, the good news: DWIP works with just about ANY printer.  It
  30. just uses standard text characters, overstriking them in varying amounts
  31. to make different shades of grey.  It does overstriking by first sending
  32. one entire line of characters, then a carriage return code (CR), followed
  33. by another line of characters and another until the desired darkness is
  34. achieved (up to 5 passes for the darkest shade).  It only sends a line 
  35. feed code (LF) when it is done with all passes over a given line.  This 
  36. is in keeping with the way the Amiga operates, sending out only a LF at 
  37. the end of a line, which returns the carriage to its home position and 
  38. also moves the roller forward one line.
  39.     In normal operation, the Amiga doesn't use the CR at all, but most
  40. printers use the CR only to return the carriage without moving the
  41. roller.  However, some will move the roller as well when they get a CR,
  42. and in that case DWIP will not work properly with the default settings.
  43. Here's what you should do to test DWIP:  There is a "test" mode, which you
  44. invoke by typing:
  45.  
  46. DWIP -z
  47.  
  48. This will produce a file starting with the letters DW and having four
  49. more characters after that, in your RAM: directory.  You can print that
  50. file on your printer, as in:
  51.  
  52. copy RAM:filename to prt:
  53.  
  54. What you should see is five lines, each one having 36 characters in it.
  55. (Actually, there are many more characters than that, but the ones toward
  56. the left should be overstruck to produce dark rectangles over the letter
  57. positions.)  The five lines should all be identical and single-spaced, 
  58. and they should look nearly black on the left and nearly white on the 
  59. right.  This is the DWIP grey-scale.
  60.     If your test pattern doesn't look like this, chances are you're
  61. looking at about 25 lines of output instead of 5.  In that case, your
  62. printer is moving the roller with every carriage return code.  I would
  63. recommend checking your printer manual at this point, and see if there
  64. is a dip switch that controls the treatment of carriage returns.  Disabling
  65. automatic linefeeds with every carriage return should make DWIP work
  66. properly, without affecting the normal operation of your printer with the
  67. Amiga.  If you can't find such a dip switch on your printer, or if moving
  68. it affects your other printing with the Amiga, then there is one other
  69. possibility.  There is a "universal printer" option on DWIP (-u) which
  70. you can try.  It works by sending a bunch of backspaces at the end of
  71. each line, instead of a CR, so there's a chance this might work with your
  72. printer.  (Actually, this option isn't as universal as I had intended,
  73. since some printers don't seem to backspace a full character width and
  74. the result is a real mess.)  To try this option, use:
  75.  
  76. DWIP -z -u
  77.  
  78. and then use the copy command to print out the resulting file.  (It will
  79. have a different name from the first one.)  And if this doesn't give the 
  80. 5-line test pattern I described above, you're out of luck.  DWIP doesn't 
  81. work with your printer.
  82.  
  83.     Now on to continue with the good news:
  84.  
  85.     A dot matrix printer will work just as well as a daisy wheel 
  86. printer.  I named DWIP for daisy wheels because this is the only graphics 
  87. printing utility I know of for the Amiga that also works on daisy wheel 
  88. printers.
  89.     Also in the realm of good news, I'll tell you that DWIP has many
  90. options, allowing you to print any part of the screen on printers of
  91. any carriage width, either normal or sideways.  It can even be used as
  92. a quick-and-dirty slide-show program (although it doesn't do fancy things
  93. like scrolls, fades or dissolves).
  94.     Finally, DWIP can blow up a picture as large as you like, including
  95. generating more than one character on your printer per dot on the screen.
  96. That means you can make some very large banners from your IFF files,
  97. although of course you'll have to do some pasting as soon as you go
  98. beyond the width of your printer.  (However, DWIP has a sideways printing
  99. option so you can print very long images in a single pass.)
  100.     Now for the bad news: First of all, DWIP doesn't do color.  It
  101. approximates the colors of the screen as shades of grey (you have control
  102. over that, too).
  103.     Second, DWIP doesn't currently support all the IFF file formats.  It
  104. is limited to low-resolution, non-HAM screens.  (No interlace, overscan,
  105. PAL, high-resolution, or HAM files will work.)  Third, it doesn't run from
  106. the workbench; you have to run it from the CLI.
  107.  
  108. USING DWIP
  109. ==========
  110.     The format for starting DWIP from the CLI is as follows:
  111.  
  112. DWIP [options] files
  113.  
  114. There are many options in DWIP, and any or all may be used in combination.
  115. All options consist of a minus sign (-) and a one-letter code.  In addition,
  116. many codes are followed by a number (annotated as "val" below) or a
  117. string of characters (annotated as "string" below).  Here is a summary of 
  118. all the options:
  119.  
  120.     -lval      set leftmost location on screen (default 0)
  121.     -tval      set top location on screen (default 0)
  122.     -wval      set width of screen area to print (default 320)
  123.     -hval      set height of screen area to print (default 200)
  124.     -pval      set printer pitch (default 10)
  125.     -cval      set # columns to use across printer (default 135)
  126.     -nval      set # lines per inch on printer (default 6)
  127.     -istring   set initialization string (default is none)
  128.     -estring   set end-of-line string (default is newline)
  129.     -u         "universal" printer option (use backspaces instead of CR)
  130.     -ofile     send output to named file (default is PRT:)
  131.     -s         print sideways
  132.     -m         "modified" picture (inverse intensity)
  133.     -rval      set red relative intensity (default 1.0)
  134.     -gval      set green relative intensity (default 0.7)
  135.     -bval      set blue relative intensity (default 1.0)
  136.     -vtime     view file for time seconds, instead of printing
  137.     -z         print a test pattern (after any named files)
  138.  
  139. The default for DWIP is to make a copy of the entire screen on the printer
  140. using 135 columns (standard wide-carriage printer in 10-pitch).  To zoom 
  141. in on a smaller portion of the screen, you have to specify the coordinates
  142. of the left, top corner of the area you want, as well as the width and
  143. height of the area.  For instance, if you wanted to print an area beginning
  144. 110 dots (pixels) in from the left edge of the screen, 200 dots wide,
  145. and beginning 50 dots from the top edge of the screen, 100 dots high,
  146. of an IFF file named "myfile", you would start DWIP with the command:
  147.  
  148. DWIP -l110 -w200 -t50 -h100 myfile
  149.  
  150. DWIP IS case-sensitive, so be sure to use lower-case letters on the options.
  151. File names are the same as standard AmigaDOS, so case doesn't matter there.
  152.     To complicate matters, let's say you only have an 80-column printer.
  153. Then you would have to use the -c parameter to set the number of columns,
  154. as in:
  155.  
  156. DWIP -l110 -w200 -t50 -h100 -c80 myfile
  157.  
  158.     Or suppose your printer prints in 12 pitch, instead of 10 (which DWIP
  159. assumes).  You can specify the pitch with the -p parameter, as in: -p12
  160.     Or suppose your printer had a compressed printing mode that let you
  161. put 120 characters across a standard 8" printing area.  Then you'd need
  162. the -c parameter (-c120), but you'd also need to change the pitch. Pitch 
  163. is just the number of characters per inch, so you have 120 / 8 = 15.
  164.     You can also change the vertical pitch (the number of lines per inch)
  165. with the -n parameter.  The default is 6 (as in 66 lines / 11 inches),
  166. the standard for nearly all printers, but you can easily change this.
  167.     You will notice that although DWIP gives you direct control over the
  168. width of the picture you will produce (via the -c parameter), you do not
  169. have control over the length of the picture produced.  DWIP automatically
  170. selects a picture length to keep the aspect ratio of the screen as nearly
  171. as possible.
  172.  
  173.     The output file name DWIP chooses is intended to be a "unique" name.
  174. So it makes up a name that doesn't already exist in the RAM: directory
  175. and uses that.  If you use DWIP several times, you have to be careful
  176. to delete these files or they'll pile up because DWIP never overwrites
  177. these files.  The alternative is for you to explicitly tell DWIP the file
  178. name you'd like your output to go to.  Use the -o option, and you can
  179. send the file anywhere you like.  For instance, you can send the output
  180. to a file call "myoutput" on your hard drive with a command like:
  181.  
  182. DWIP -odh0:myoutput [options] myfile
  183.  
  184. You can even specify "prt:" as the output file, and then Dwip will
  185. automatically print it for you and you can skip the intermediate-file
  186. step.  I don't really recommend this, however, since you can't stop
  187. Dwip once it starts printing.  This is true if you try to stop it, or 
  188. if your printer goes offline and the familiar "Printer Trouble" requester 
  189. appears.
  190.     Since Dwip itself is pretty fast, and the only slow step is the
  191. actual printing, you may want to do that step in the background, as in:
  192.  
  193. run c:copy RAM:file to prt:
  194.  
  195. By using the 'run' command, you can then go on and do other things
  196. while the file is printed.
  197.  
  198.     DWIP prints color pictures by estimating the brightness of each
  199. different color.  The basic idea is to add the red, green and blue
  200. components of the color.  This would yield a number in the range from
  201. 0 (black) to 45 (white) since each of the RGB components has a range
  202. from 0 to 15.  However, I have made the observation that the green 
  203. color on the Amiga is somewhat lighter than the red or the blue.  You 
  204. can see this very easily in Preferences by creating a screen with full 
  205. green color and no red or blue, and comparing it to the corresponding 
  206. red and blue full colors.  Therefore, I call the red and blue "full 
  207. darkness" colors, but green is only about 70% as dark.  Note that I 
  208. speak of darkness, not lightness.  That's because DWIP starts with a 
  209. white sheet of paper and adds darkness to the dots to create a picture.
  210.     If you disagree with my choices, you can easily change them yourself.
  211. The -r, -g and -b parameters allow you to enter a decimal number (between
  212. 0 and 1) corresponding to the percentage of darkness for each component.
  213. The default is 100% (1.0) for red and blue, and 70% (0.7) for green.
  214. To give equal weighting to all three colors, just use -g1.  You can
  215. effectively darken the entire picture by setting numbers slightly greater
  216. than 1 for the 3 parameters, or lighten it by using numbers less than 1
  217. (but never less than 0).
  218.     By default, DWIP sends no initialization string to the printer and
  219. only a linefeed character at the end of each line.  You can change each
  220. of these, to suit the needs of your printer.  For instance, you may want
  221. your printer to do a form feed before each picture, or you may want it
  222. to send an escape code to change the printer pitch.  The format for
  223. specifying an initialization string is -istring where "string" is any
  224. string of characters.  You can embed non-printing ASCII codes by
  225. specifying them in the form \nnn where nnn is a 3-digit decimal number
  226. for the ASCII code.  (NOTE, C programmers, that even with a leading zero
  227. this number is decimal, NOT octal!)  For instance, you can tell DWIP to 
  228. send a form feed (ASCII code 12) before every picture by using:
  229.  
  230. DWIP -i\012 myfile
  231.  
  232. Note that all three digits (012) must be specified.  Or if you need to 
  233. send an escape, left-bracket ([), and 't' you would use:
  234.  
  235. DWIP -i\027[t myfile
  236.  
  237.     You can set the end-of-line code sent by DWIP in the same manner.
  238. By default, DWIP sends only a linefeed code (ASCII 10), but with the -e
  239. option you can specify any string you like.  Note that here I am talking
  240. about what DWIP does AFTER all overstriking is complete; only the -u
  241. option discussed above affects what is done DURING overstriking.
  242.     You can print sideways by using the -s flag, or you can "invert" the
  243. image with the -m (modify) flag.  By "invert", I mean printing the
  244. negative of the image, exchanging dark for light as in a photo negative.
  245. (This option really should have been flagged as -i or -n, but both of
  246. those letters were already being used for other options, so I was stuck
  247. with -m.  Such are the perils of the English language. :<] )
  248.     Finally, if you use the -v option you can make DWIP act like a simple
  249. slideshow utility.  The number after the v is the number of seconds to
  250. pause before bringing up the next picture.  For instance:
  251.  
  252. DWIP -v10 file1 file2 file3
  253.  
  254. would display each of the 3 files in succession, pausing 10 seconds
  255. between each one.  This option stops any printing from being done at
  256. all; it is strictly for viewing files.
  257.     One final note: all parameters to DWIP are order-dependent; they
  258. are evaluated as they are encountered, and can be placed in whatever
  259. order is logical for your situation.  You can set and reset parameters
  260. in a single command line.  For instance, you could do something like:
  261.  
  262. DWIP -l20 -w200 -c80 -ofilout1 myfile1 -l120 -t100 -ofilout2 myfile2
  263.  
  264. This would use two different output files, with the picture for myfile1
  265. being sent to filout1 and the picture for myfile2 sent to filout2.  The
  266. -s and -m parameters are toggles, incidentally.  Using them once in a
  267. command turns the option on; using them again turns them off, and so on.
  268.  
  269. Happy printing! (:<)
  270.  
  271.